﻿using System.Configuration;

namespace ChannelVN.Cached.Common
{
    public class DBConstants
    {
        //public readonly static string DOMAIN = ConfigurationManager.AppSettings["Host"].TrimEnd('/');
        //public readonly static string DATABASE_NAME = ConfigurationManager.AppSettings["DBName"];
        //public const string URL_EXTENSION = ".htm";

        public readonly static string DATABASE_NAME = ConfigurationManager.AppSettings["DBName"];

        public const int MAX_PAGE = 6;

        public class NEWS_TYPE
        {
            public const int NoiBatTrangChu = 1;
            public const int TinTrangChu = 2;
            public const int NoiBatChuyenMuc = 3;
            public const int TinTrangChuyenMuc = 4;
        }

        public enum DISPLAY_STYLE
        {
            LARGE_AVATAR = 1
        }

        public class Zone{
            public const string TableName = "Zone";
            public const string ID = "Id";
            public const string Name = "Name";
            public const string ParentID = "ParentId";
        }

        public class Video
        {
            public const string TableName = "Video";
            public const string ZoneId = "ZoneId";
            public const string ID = "Id";
            public const string Title = "Name";
            public const string Description = "Description";
            public const string Url = "Url";
            public const string AbsoluteURL = "AbsoluteUrl";
            public const string ImageURL = "ImageURL";
            public const string Image = "Avatar";
            public const string RelateUrl = "RelateUrl";
            public const string KeyVideo = "KeyVideo";
            public const string PName = "Pname";
            public const string Tags = "Tags";
            public const string Views = "Views";
            public const string PublishDate = "PublishDate";

            public const string EncodedTitle = "EncodedTitle";

        }

        public class ZoneVideo
        {
            public const string TableName = "ZoneVideo";
            public const string ID = "Id";
            public const string Name = "Name";
            public const string Url = "Url";
        }

        public class NewsPublish
        {
            public const string TableName = "NewsPublish";
            public const string ID = "NewsId";
            public const string ZoneId = "ZoneId";
            public const string Title = "Title";
            public const string SubTitle = "SubTitle";
            public const string Sapo = "Sapo";
            public const string Avatar = "Avatar";
            public const string DistributionDate = "DistributionDate";
            public const string Url = "Url";
            public const string Source = "Source";
            public const string Content = "Body";
            public const string Author = "Author";
            public const string DisplayStyle = "DisplayStyle";
            public const string NewsTypeIcon = "NewsTypeIcon";
            public const string NewsType = "NewsType";
            public const string NewsRelation = "NewsRelation";
            public const string AvatarDesc = "AvatarDesc";
            public const string InitSapo = "InitSapo";
            public const string LikeNumber = "LikeNumber";
            public const string ImageURL = "ImageURL";
            public const string AbsoluteURL = "AbsoluteURL";
            public const string SortURL = "SortURL";
            public const string FormatedDistributionDate = "FormatedDistributionDate";
            public const string FormatedImage = "FormatedImage";
            public const string EncodedTitle = "EncodedTitle";
            public const string EncodeBase64Title = "EncodeBase64Title";

        }

        public class NewsContent
        {
            public const string TableName = "NewsContent";

            public const string OriginalId = "OriginalId";
        }

        public class NewsPosition
        {
            public const string TableName = "NewsPosition";
        }

        public class Tag
        {
            public const string TableName = "Tag";
            public const string ID = "Id";

            public const string Title = "Name";
            public const string Avatar = "Avatar";
            public const string ParentId = "ParentId";
            public const string ImageURL = "ImageURL";
            public const string IsThread = "IsThread";
            public const string Url = "Url";
            public const string RelativeURL = "RelativeURL";
            public const string AbsoluteURL = "AbsoluteURL";
            public const string FormatedImage = "FormatedImage";
            public const string EncodedTitle = "EncodedTitle";

            //alias in sql
            public const string TagID = "TagID";
            public const string TagURL = "TagURL";
            public const string TagName = "TagName";
            //end alias in sql
        }

        public class TagNews
        {
            public const string TableName = "TagNews";
        }

        public class MetaAttributes
        {
            public class Description
            {
                public const string Id = "metaDes";
                public const string Name = "description";
            }

            public class Keywords
            {
                public const string Id = "metaKey";
                public const string Name = "keywords";
            }

            public class NewKeywords
            {
                public const string Id = "metNewKey";
                public const string Name = "news_keywords";
            }
        }


        public const int CATID_YEU = 10016;
        public const int CATID_HINHSU = 10000;
        public const int CATID_FUN = 10031;
        public readonly static int[] EXCEPTIONS_CAT_IDs = new[] {
                                            CATID_YEU // yeu,
                                            ,CATID_HINHSU //hinh su
                                            ,CATID_FUN //fun
                                         };
        public readonly static int[] CATEGORIES =  { 
                                             10009,//xa hoi
                                             10030,//the gioi
                                             10058,//quan su
                                             10015,//phap luat
                                             10019,//kinh doanh
                                             10020,//cong nghe
                                             10002,//the thao
                                             10001,//giai tri
                                             10014,//suc khoe
                                             10017,//dep
                                             10010//chuyen la
                                         };
    }
}
